﻿namespace Contract
{
    public record DirectiveInfo(string Key, string Description, string Path, ParameterInfo[] ParameterInfos);

    public record ParameterInfo(string Key, string Description, Type ValueType);

    public record VariableInfo(string Key, string Description);

    public abstract class ParameterValueBase
    {
    }

    public sealed class CustomParameterValue(object value) : ParameterValueBase
    {
        public object Value { get; } = value;
    }

    public sealed class VariableParameterValue(string variableKey) : ParameterValueBase
    {
        public string VariableKey { get; } = variableKey;
    }

    public record Directive(string Key, ParameterValueBase[] Parameters);

    public record Segment(string Description, Directive[] Directives);

    public interface ISource
    {
        IEnumerable<DirectiveInfo> GetDirectiveInfos();

        IEnumerable<VariableInfo> GetVariableInfos();
    }

}
